package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Integral;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface IntegralMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Integral record);

    Integral selectByPrimaryKey(Long id);

    List<Integral> selectAll();

    int updateByPrimaryKey(Integral record);

    List<Integral> selectForList(QueryObject qo);


    Integral selectSign(@Param("userId") Long userId, @Param("typeId") Long typeId, @Param("oldTime") Date oldTime, @Param("currentTime") Date currentTime);

    List<Date> selectSignDay(@Param("month") Integer month, @Param("userId") Long userId, @Param("typeId") Long typeId);

    Integer getCount();

    List<Integral> roll(Integral integral);
}